package com.hstcs.screen;

import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.hstcs.assets.Assets;
import com.hstcs.assets.FileName;
import com.hstcs.game.XGame;
import com.hstcs.ui.HSelect;

public class SelectScreen implements Screen {
	public static SelectScreen instance =null;
	
	public static SelectScreen getInstance()
	{
		if(instance == null){
			instance = new SelectScreen();
		}
		return  instance;
	}
	
	private Stage stage = null;
	private Image bg = null;
	private boolean init = false;
	private HSelect select ;
	
	public void initActor(){
		if(init == true) return;
		init = true;
		bg = new Image((Texture)Assets.get(FileName._SELECT_BG));
		bg.setFillParent(true);
		select = new HSelect();
	}
	
	@Override
	public void render(float delta) {
		// TODO Auto-generated method stub
		stage.act();
		stage.draw();
	}

	@Override
	public void resize(int width, int height) {
		// TODO Auto-generated method stub

	}

	@Override
	public void show() {
		// TODO Auto-generated method stub
		stage = XGame.getInstance().stage;
		stage.clear();
		initActor();
		stage.addActor(bg);
		stage.addActor(select);
	}

	@Override
	public void hide() {
		// TODO Auto-generated method stub

	}

	@Override
	public void pause() {
		// TODO Auto-generated method stub

	}

	@Override
	public void resume() {
		// TODO Auto-generated method stub

	}

	@Override
	public void dispose() {
		// TODO Auto-generated method stub

	}

}
